﻿using FluentNHibernate.Mapping;
using EntitiesAndMappings.Entities;

namespace EntitiesAndMappings.Mappings
{
    public class DetalleIngresoMap:ClassMap<DetalleIngreso>
    {
        public DetalleIngresoMap()
        {
            Id(x => x.Id).GeneratedBy.Native();
            References(x => x.Articulo).LazyLoad(Laziness.False).Not.Nullable();
            Map(x => x.Cantidad).Not.Nullable();
            References(x => x.CondicionEquipo).LazyLoad(Laziness.False).Not.Nullable();
            Map(x => x.Partes).Nullable();
            Map(x => x.Consumibles).Nullable();
            Map(x => x.ObservacionesMantenimiento).Nullable();         
        }
        
    }
}
